package com.roadjava.convert.demo06;

import com.roadjava.beans.dto.CarDTO;
import com.roadjava.beans.vo.CarVO;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public abstract class CarConvert06 {

    public static CarConvert06 INSTANCE = Mappers.getMapper(CarConvert06.class);

    @Mapping(source = "brand", target = "brandName")
    public abstract CarVO dto2vo(CarDTO carDTO);

    @InheritInverseConfiguration
    public abstract CarDTO vo2dto(CarVO carVO);

}